const {Comment} = require('../../model/comment');

module.exports = async (req,res) => {
    const {content,uid,aid} = req.body;
    // res.send(body)
    // console.log(body);
    await Comment.create({
        content: content,
        uid: uid,
        aid: aid,
        time: new Date()
    });
    res.redirect('/home/article?id=' + aid);
}